﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BenefitHelper.Sys;
namespace BenefitHelper.IHelper
{
    public interface IAccount
    {
        /// <summary>
        /// 从Server中发现新的账号并临时保存
        /// </summary>
        /// <param name="loginAccount">Server中的登录名</param>
        void InsertIntoBenefitFromServer(string loginAccount);

        /// <summary>
        /// 获取所有分析系统的账号
        /// </summary>
        /// <returns></returns>
        List<Account> GetList();

        /// <summary>
        /// 根据账户名得到账户编号
        /// </summary>
        /// <param name="accountName"></param>
        /// <returns></returns>
        int GetAccountId(string accountName);

        /// <summary>
        /// 找到某日同一个批次交易员的所有账号
        /// </summary>
        /// <param name="Batch"></param>
        /// <returns></returns>
        List<Account> GetBatchAccounts(int batch, int tradeHistoryId);

        /// <summary>
        /// 得到一些交易员的所有账号
        /// </summary>
        /// <param name="operators"></param>
        /// <returns></returns>
        List<Account> GetOperatorsAccount(List<Operator> operators, int tradeHistoryId);

        /// <summary>
        /// 判断账号在某个月中是否变换过所有者
        /// </summary>
        /// <param name="year"></param>
        /// <param name="month"></param>
        /// <param name="accountid"></param>
        /// <returns></returns>
        bool HasChangedOwnerInMonth(int year, int month, int accountid);

        /// <summary>
        /// 判断账号在一年中是否变换过所有者
        /// </summary>
        /// <param name="year"></param>
        /// <param name="accountid"></param>
        /// <returns></returns>
        bool HasChangedOwnerInYear(int year, int accountid);

        /// <summary>
        /// 判断账号在一周中是否变换过所有者
        /// </summary>
        /// <param name="year"></param>
        /// <param name="month"></param>
        /// <param name="week"></param>
        /// <param name="accountid"></param>
        /// <returns></returns>
        bool HasChangedOwnerInWeek(int year, int month, int week, int accountid);
    }
}
